<template>
  <div>
<!--    sellerId; name; nickName; password; salt; email; mobile; telephone; status; addressDetail; linkmanName; linkmanQq;
    linkmanMobile; linkmanEmail; licenseNumber; taxNumber; orgNumber; address; logoPic; brief;createTime; legalPerson; legalPersonCardId; bankUser; bankName;-->
    <el-form :model="seller">
      <el-form-item label="公司名称" :label-width="formLabelWidth">
        <el-input v-model="seller.name" autocomplete="off" placeholder="公司名称"></el-input>
      </el-form-item>
      <el-form-item label="公司电话" :label-width="formLabelWidth">
        <el-input v-model="seller.mobile" autocomplete="off" placeholder="公司电话"></el-input>
      </el-form-item>
      <el-form-item label="公司详细地址" :label-width="formLabelWidth">
        <el-input v-model="seller.addressDetail" autocomplete="off" placeholder="公司详细地址"></el-input>
      </el-form-item>
      <el-form-item label="联系人姓名" :label-width="formLabelWidth">
        <el-input v-model="seller.linkmanName" autocomplete="off" placeholder="联系人姓名"></el-input>
      </el-form-item>
      <el-form-item label="联系人QQ" :label-width="formLabelWidth">
        <el-input v-model="seller.linkmanQq" autocomplete="off" placeholder="联系人QQ"></el-input>
      </el-form-item>
      <el-form-item label="联系人手机" :label-width="formLabelWidth">
        <el-input v-model="seller.linkmanMobile" autocomplete="off" placeholder="联系人手机"></el-input>
      </el-form-item>
      <el-form-item label="联系人EMAIL" :label-width="formLabelWidth">
        <el-input v-model="seller.linkmanEmail" autocomplete="off" placeholder="联系人EMAIL"></el-input>
      </el-form-item>
      <el-form-item label="营业执照号" :label-width="formLabelWidth">
        <el-input v-model="seller.licenseNumber" autocomplete="off" placeholder="营业执照号"></el-input>
      </el-form-item>
      <el-form-item label="税务登记证号" :label-width="formLabelWidth">
        <el-input v-model="seller.taxNumber" autocomplete="off" placeholder="税务登记证号"></el-input>
      </el-form-item>
      <el-form-item label="组织机构代码证" :label-width="formLabelWidth">
        <el-input v-model="seller.orgNumber" autocomplete="off" placeholder="组织机构代码证"></el-input>
      </el-form-item>
      <el-form-item label="法定代表人" :label-width="formLabelWidth">
        <el-input v-model="seller.legalPerson" autocomplete="off" placeholder="法定代表人"></el-input>
      </el-form-item>
      <el-form-item label="法定代表人身份证号" :label-width="formLabelWidth">
        <el-input v-model="seller.legalPersonCardId" autocomplete="off" placeholder="法定代表人身份证号"></el-input>
      </el-form-item>
      <el-form-item label="开户行名称" :label-width="formLabelWidth">
        <el-input v-model="seller.bankName" autocomplete="off" placeholder="开户行名称"></el-input>
      </el-form-item>
      <el-form-item label="开户行支行" :label-width="formLabelWidth">
        <el-input v-model="seller.bankUser" autocomplete="off" placeholder="开户行支行"></el-input>
      </el-form-item>
    </el-form>
    <el-button type="primary" style="width: 100%" @click="save">保存</el-button>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data(){
    return{
      formLabelWidth: '140px',
      seller:{
        sellerId:'',
        name:'',
        nickName:'',
        email:'',
        mobile:'',
        telephone:'',
        addressDetail:'',
        linkmanName:'',
        linkmanQq:'',
        linkmanMobile:'',
        linkmanEmail:'',
        licenseNumber:'',
        taxNumber:'',
        orgNumber:'',
        address:'',
        legalPerson:'',
        legalPersonCardId:'',
        bankUser:'',
        bankName:''
      }
    }
  },
  methods:{
    getByName() {
      axios.get("/seller/getByName").then(resp => {
        console.log(resp);
        this.seller=resp.data.data;
      }).catch(resp => {

      });
    },
    save() {
      axios.post("/seller/updateInfo",this.seller).then(resp=>{
        if (resp.data.code === "1") {
          this.getByName();
          this.$message({
            message: '保存成功',
            type: 'success'
          });
        }
      })
    }
  },
  mounted() {
    this.getByName();
  }
}
</script>

<style scoped>

</style>